#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File  : Vsersion.py
# @Author: Xuhao
# @Date  : 2018/4/20
# @Desc  : 

from flask_restful import Resource
from flask import request
from flask import jsonify
import json
from app.Modules.version_modules import VersionControll

class VersionInfo(Resource):

    def get(self):

        ret = VersionControll.fetch_versioninfo()

        if ret != None:
            return jsonify({'error_code': 0,
                            'data': json.loads(ret)})
        else:
            return {'error_code': 1001,
                    'data': json.loads(ret)}


class BannerInfo(Resource):
    def post(self):
        jsondata = request.form.to_dict()
        cnt = jsondata['cnt']


